<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
				<td width="80">货品id</td>

				<td width="">颜色</td>
				<td width="">尺码</td>

				<td width="40">库存</td>
				<td width="">货号</td>
				<td width="150">操作</td>
			</tr>
			<?php foreach ($listData as $k=>$v){?>
			<tr>
				<!--id-->
				<td><?php echo $v['glid']?></td>
				<!--颜色 和尺码-->
				
				<td><?php echo $v['combine'][0]?></td>
				<td><?php echo $v['combine'][1]?></td>
				<!--库存-->
				<td><?php echo $v['inventory']?></td>
				<!--货号-->
				<td><?php echo $v['number']?></td>
				<td>
					<a href="<?php echo U('edit',array('gid'=>$v['gid'],'glid'=>$v['glid']))?>" class="btn btn-sm btn-warning">编辑</a>
					<a href="javascript:if(confirm('确认删除吗?')) location.href='<?php echo U('del',array('glid'=>$v['glid'],'gid'=>$v['gid']))?>' ;" class="btn btn-sm btn-danger">删除</a>
				</td>
			</tr>
			<?php }?>
			<!--添加货品-->
			<tr>
				<form action="" method="post">
					
					
				
				<td width="50">添加货品</td>
				
				<td width="40">
					<select name="combine[]">
						
						<?php foreach ($goodsAttr as $k=>$v){?>
						<?php if($goodsAttr[$k]['taname']=='颜色'){?>
                
						<?php foreach ($v['tavalue'] as $kk=>$vv){?>
						
						<option value="<?php echo $goodsAttr[$k]['gtid']?>"><?php echo $vv?></option>
						
						<?php }?>
						
               <?php }?>
						
						<?php }?>

					</select>
				</td>
					<td width="40">
					<select name="combine[]">
						
						<?php foreach ($goodsAttr as $k=>$v){?>
						<?php if($goodsAttr[$k]['taname']=='尺寸'){?>
                
						<?php foreach ($v['tavalue'] as $kk=>$vv){?>
						
						<option value="<?php echo $goodsAttr[$k]['gtid']?>"><?php echo $vv?></option>
						
						<?php }?>
						
               <?php }?>
						
						<?php }?>

					</select>
				</td>
				<!--库存-->
				<td width="">
					<input type="text" name="inventory" id="" value="" />
				</td>
				<!--货号-->
				<td width="40">
					<input type="text" name="number" id="" value="" />
				</td>
				<td>
					<input type="hidden" name="gid" id="gid" value="<?php echo $goodsAttr[$k]['gid']?>" />
					<input type="submit" class="btn btn-sm btn-warning" value="提交"/>
				</td>
				</form>
			</tr>
			
		</table>
	</body>
</html>
